package com.gitee.shigen.controller;

import cn.hutool.core.util.IdUtil;
import com.gitee.shigen.mq.procuder.NotifyMsgProducer;
import com.gitee.shigen.vo.NotifyMsgSendVO;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shigenfu
 * @date 2023/7/7 4:36 下午
 */
@RestController
public class TestMqController {

    @Resource
    private NotifyMsgProducer notifyMsgProducer;

    @GetMapping("/produce")
    public String produce() {
        NotifyMsgSendVO vo = new NotifyMsgSendVO();
        vo.setPriKey(IdUtil.fastSimpleUUID());
        vo.setPhoneNum("191xxxxxxxx");
        vo.setBusinessType("msg_send");
        notifyMsgProducer.send(vo);
        return "success";
    }
}
